import request from './request'

export function getBooks() {
  const url = 'books'
  return request.get(url)
  // return request({
  //   url: url,
  //   method: 'GET'
  // })
}

export function getArticles(table, page) {
  // let search = [{key: 'type', 'relation': '=', val: ''}]
  let search = []
  search = JSON.stringify(search)
  const url = table + '?page=' + page + '&search=' + search
  return request.get(url)
}

export function getArticle(table, id) {
  const url = table + '/' + id
  return request.get(url)
}



/**
 * 获取团队风采
 * @returns {Promise<AxiosResponse<any>>}
 */
export function getTeams() {
  const url = 'teams'
  return request.get(url)
}
